﻿///////////////////////////////////////////////////////////////
// Projet serveur entreprise
// Authors: Pierre Corsini, Guillaume Blanc
// mars 2011
///////////////////////////////////////////////////////////////

using System;
using System.Collections.Generic;

using System.Text;

namespace DLL
{
    public class Historique
    {
        private int _id;
        public int Id { get { return _id; } }

        private DateTime _date;
        public DateTime Date { get { return _date; } }

        private string _type;
        public string Type { get { return _type; } }

        private int _idcompte;
        public int IdCompte { get { return _idcompte; } }

        private double _somme;
        public double Somme { get { return _somme; } }

        public string StringRepresentation
        {
            get { return this.ToString(); }
            set { }
        }

        public Historique() : base() { }

        public Historique(int id, DateTime date, string type, int idcompte, double somme)
        {
            this._id = id;
            this._date = date;
            this._type = type;
            this._idcompte = idcompte;
            this._somme = somme;
        }


        public override string ToString()
        {
            return String.Format("[{0}] {1}, somme:{2}, idcompte:{3} type:{4}", Id, Date, Somme, IdCompte, Type);
        }
    }
}
